package br.com.comprasandroid;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.util.Log;
import android.widget.CheckBox;

public class ComprasandroidActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home);
        
        CheckBox cebolinha = (CheckBox) findViewById(R.id.checkCebolinha);
        CheckBox rucula = (CheckBox) findViewById(R.id.checkRucula);
        CheckBox arroz = (CheckBox) findViewById(R.id.checkArroz);
        CheckBox peixe = (CheckBox)findViewById(R.id.checkPeixe);
        CheckBox creamchease = (CheckBox) findViewById(R.id.checkCreamchease);
        CheckBox pepino = (CheckBox) findViewById(R.id.checkPepino);
        
        AlertDialog.Builder msgAlert = new AlertDialog.Builder(this);
        msgAlert.setTitle("Escolha a quantidade");
        msgAlert.setMessage("Escolha");
        msgAlert.setPositiveButton("OK", new DialogInterface.OnClickListener() {
			
			public void onClick(DialogInterface dialog, int which) {
				Log.d("AlertDialog", "Positive");
				
			}
		});
        
        if(cebolinha.isChecked()){
        	msgAlert.show();
        }
        
    }
}